jsonforms-renderers(spreadsheet): separate spreadsheet matrix processing from parsing - #31
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesSpreadsheet processing
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR extracts existing spreadsheet matrix processing into a reusable helper without changing parsing or persisted data behavior. It is merge-ready after normal checks, with no actionable merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a3a3a83 to
f10285a
Compare
f10285a to
9853559
Compare
9853559 to
2904386
Compare
Extracts the "evaluate formulas against an already-parsed matrix, then shape the persisted value" step out of SpreadsheetControl's processFile callback into a standalone, format-agnostic processMatrix() helper. parseWorkbookToMatrix (xlsx/csv-specific) is untouched; a future XML-upload path that produces the same CellValue[][] matrix shape can reuse processMatrix without duplicating the evaluate-and-shape logic. Also relocates the SpreadsheetValue type out of SpreadsheetControl.tsx into the shared utils/spreadsheet types, since it's no longer private to one renderer. Pure, behavior-preserving refactor — derivations stay array-shaped here, unchanged from main; see the next PR for the id-keyed map change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2904386 to
742ff1c
Compare
Summary
Pure, behavior-preserving refactor: extracts the "evaluate formulas against an already-parsed matrix, then shape the persisted value" step out of
SpreadsheetControl'sprocessFilecallback into a standalone, format-agnosticprocessMatrix()helper (newutils/spreadsheet/process.ts).parseWorkbookToMatrix(xlsx/csv-specific) is untouched.CellValue[][]matrix shape (e.g. XML) could reuseprocessMatrixwithout duplicating the evaluate-and-shape logic — no such format is added here, this PR only creates the reusable seam.SpreadsheetValueout ofSpreadsheetControl.tsxinto the sharedutils/spreadsheettypes, since it's no longer private to one renderer.derivationsstays array-shaped here, unchanged frommain— the next PR in the stack adds mandatoryidand converts this to an id-keyed map, deliberately split out so this PR stays a genuine no-behavior-change refactor with noidconcept involved at all.(Replaces the original #25, which GitHub auto-flagged as "merged" after a stack-restructuring force-push made its old head commit reachable from its old base branch — no code ever reached
main; this PR carries the same content rebased directly onto #23.)Test plan
pnpm type-checkandpnpm testpass (newprocess.test.tscoverspersistSheettrue/false, empty formulas, error-entry passthrough)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests